# _*_ coding: utf-8 _*_
# @Time : 2024-01-23 22:12
# @Author : wf

# 安装 ： pip  install pandas

import pandas as pd

df = pd.read_excel('test5.xlsx', sheet_name='Sheet')
df_values = df.sort_values(by=['桃子', '西瓜'], ascending=False)

# 保存文件
writer = pd.ExcelWriter('test5-1.xlsx')
df_values.to_excel(writer, sheet_name='Sheet2', index=False)
# writer._save()
writer._save()

